home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / OpenTransport / Interfaces / CIncludes / dlpi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-21  |  38.4 KB  |  1,210 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        dlpi.h
  3.  
  4.     Copyright:    © 1993-1996 by Mentat Inc., all rights reserved.
  5.  
  6. */
  7.  
  8. #ifndef __DLPI__
  9. #define __DLPI__
  10.  
  11. #if PRAGMA_ALIGN_SUPPORTED
  12. #pragma options align=mac68k
  13. #endif
  14.  
  15. /*
  16.  * dlpi.h header for Data Link Provider Interface
  17.  */
  18.  
  19. /*
  20.  * This header file has encoded the values so an existing driver
  21.  * or user which was written with the Logical Link Interface(LLI)
  22.  * can migrate to the DLPI interface in a binary compatible manner.
  23.  * Any fields which require a specific format or value are flagged
  24.  * with a comment containing the message LLI compatibility.
  25.  */
  26.  
  27. /*
  28.  *    DLPI revision definition history
  29.  */
  30. #define DL_CURRENT_VERSION    0x02    /* current version of dlpi */
  31. #define DL_VERSION_2        0x02    /* version of dlpi March 12,1991 */
  32.  
  33. /*
  34.  * Primitives for Local Management Services
  35.  */
  36. #define DL_INFO_REQ         0x00    /* Information Req, LLI compatibility */
  37. #define DL_INFO_ACK         0x03    /* Information Ack, LLI compatibility */
  38. #define DL_ATTACH_REQ        0x0b    /* Attach a PPA */
  39. #define DL_DETACH_REQ        0x0c    /* Detach a PPA */
  40. #define DL_BIND_REQ         0x01    /* Bind dlsap address, LLI compatibility */
  41. #define DL_BIND_ACK         0x04    /* Dlsap address bound, LLI compatibility */
  42. #define DL_UNBIND_REQ        0x02    /* Unbind dlsap address, LLI compatibility */
  43. #define DL_OK_ACK            0x06    /* Success acknowledgment, LLI compatibility */
  44. #define DL_ERROR_ACK        0x05    /* Error acknowledgment, LLI compatibility */
  45. #define DL_SUBS_BIND_REQ    0x1b    /* Bind Subsequent DLSAP address */
  46. #define DL_SUBS_BIND_ACK    0x1c    /* Subsequent DLSAP address bound */
  47. #define DL_SUBS_UNBIND_REQ    0x15    /* Subsequent unbind */
  48. #define DL_ENABMULTI_REQ    0x1d    /* Enable multicast addresses */
  49. #define DL_DISABMULTI_REQ    0x1e    /* Disable multicast addresses */
  50. #define DL_PROMISCON_REQ    0x1f    /* Turn on promiscuous mode */
  51. #define DL_PROMISCOFF_REQ    0x20    /* Turn off promiscuous mode */
  52.  
  53. /*
  54.  * Primitives used for Connectionless Service
  55.  */
  56. #define DL_UNITDATA_REQ     0x07    /* datagram send request, LLI compatibility */
  57. #define DL_UNITDATA_IND     0x08    /* datagram receive indication, LLI compatibility */
  58. #define DL_UDERROR_IND        0x09    /* datagram error indication, LLI compatibility */
  59. #define DL_UDQOS_REQ        0x0a    /* set QOS for subsequent datagram transmissions */
  60.  
  61. /*
  62.  * Primitives used for Connection-Oriented Service
  63.  */
  64. #define DL_CONNECT_REQ        0x0d    /* Connect request */
  65. #define DL_CONNECT_IND        0x0e    /* Incoming connect indication */
  66. #define DL_CONNECT_RES        0x0f    /* Accept previous connect indication */
  67. #define DL_CONNECT_CON        0x10    /* Connection established */
  68.  
  69. #define DL_TOKEN_REQ        0x11    /* Passoff token request */
  70. #define DL_TOKEN_ACK        0x12    /* Passoff token ack */
  71.  
  72. #define DL_DISCONNECT_REQ    0x13    /* Disconnect request */
  73. #define DL_DISCONNECT_IND    0x14    /* Disconnect indication */
  74.  
  75. #define DL_RESET_REQ        0x17    /* Reset service request */
  76. #define DL_RESET_IND        0x18    /* Incoming reset indication */
  77. #define DL_RESET_RES        0x19    /* Complete reset processing */
  78. #define DL_RESET_CON        0x1a    /* Reset processing complete */
  79.  
  80. /*
  81.  *    Primitives used for Acknowledged Connectionless Service
  82.  */
  83.  
  84. #define DL_DATA_ACK_REQ             0x21    /* data unit transmission request */
  85. #define DL_DATA_ACK_IND             0x22    /* Arrival of a command PDU */
  86. #define DL_DATA_ACK_STATUS_IND        0x23    /* Status indication of DATA_ACK_REQ*/
  87. #define DL_REPLY_REQ                0x24    /* Request a DLSDU from the remote */
  88. #define DL_REPLY_IND                0x25    /* Arrival of a command PDU */
  89. #define DL_REPLY_STATUS_IND         0x26    /* Status indication of REPLY_REQ */
  90. #define DL_REPLY_UPDATE_REQ         0x27    /* Hold a DLSDU for transmission */
  91. #define DL_REPLY_UPDATE_STATUS_IND    0x28     /* Status of REPLY_UPDATE req */
  92.  
  93. /*
  94.  * Primitives used for XID and TEST operations
  95.  */
  96.  
  97. #define DL_XID_REQ        0x29        /* Request to send an XID PDU */
  98. #define DL_XID_IND        0x2a        /* Arrival of an XID PDU */
  99. #define DL_XID_RES        0x2b        /* request to send a response XID PDU*/
  100. #define DL_XID_CON        0x2c        /* Arrival of a response XID PDU */
  101. #define DL_TEST_REQ     0x2d        /* TEST command request */
  102. #define DL_TEST_IND     0x2e        /* TEST response indication */
  103. #define DL_TEST_RES     0x2f        /* TEST response */
  104. #define DL_TEST_CON     0x30        /* TEST Confirmation */
  105.  
  106. /*
  107.  * Primitives to get and set the physical address, and to get
  108.  * Statistics
  109.  */
  110.  
  111. #define DL_PHYS_ADDR_REQ        0x31    /* Request to get physical addr */
  112. #define DL_PHYS_ADDR_ACK        0x32    /* Return physical addr */
  113. #define DL_SET_PHYS_ADDR_REQ    0x33    /* set physical addr */
  114. #define DL_GET_STATISTICS_REQ    0x34    /* Request to get statistics */
  115. #define DL_GET_STATISTICS_ACK    0x35    /* Return statistics */
  116.  
  117. /*
  118.  * DLPI interface states
  119.  */
  120. #define DL_UNATTACHED            0x04    /* PPA not attached */
  121. #define DL_ATTACH_PENDING        0x05    /* Waiting ack of DL_ATTACH_REQ */
  122. #define DL_DETACH_PENDING        0x06    /* Waiting ack of DL_DETACH_REQ */
  123. #define DL_UNBOUND                0x00    /* PPA attached, LLI compatibility */
  124. #define DL_BIND_PENDING         0x01    /* Waiting ack of DL_BIND_REQ, LLI compatibility */
  125. #define DL_UNBIND_PENDING        0x02    /* Waiting ack of DL_UNBIND_REQ, LLI compatibility */
  126. #define DL_IDLE                 0x03    /* dlsap bound, awaiting use, LLI compatibility */
  127. #define DL_UDQOS_PENDING        0x07    /* Waiting ack of DL_UDQOS_REQ */
  128. #define DL_OUTCON_PENDING        0x08    /* outgoing connection, awaiting DL_CONN_CON */
  129. #define DL_INCON_PENDING        0x09    /* incoming connection, awaiting DL_CONN_RES */
  130. #define DL_CONN_RES_PENDING     0x0a    /* Waiting ack of DL_CONNECT_RES */
  131. #define DL_DATAXFER             0x0b    /* connection-oriented data transfer */
  132. #define DL_USER_RESET_PENDING    0x0c    /* user initiated reset, awaiting DL_RESET_CON */
  133. #define DL_PROV_RESET_PENDING    0x0d    /* provider initiated reset, awaiting DL_RESET_RES */
  134. #define DL_RESET_RES_PENDING    0x0e    /* Waiting ack of DL_RESET_RES */
  135. #define DL_DISCON8_PENDING        0x0f    /* Waiting ack of DL_DISC_REQ when in DL_OUTCON_PENDING */
  136. #define DL_DISCON9_PENDING        0x10    /* Waiting ack of DL_DISC_REQ when in DL_INCON_PENDING */
  137. #define DL_DISCON11_PENDING     0x11    /* Waiting ack of DL_DISC_REQ when in DL_DATAXFER */
  138. #define DL_DISCON12_PENDING     0x12    /* Waiting ack of DL_DISC_REQ when in DL_USER_RESET_PENDING */
  139. #define DL_DISCON13_PENDING     0x13    /* Waiting ack of DL_DISC_REQ when in DL_DL_PROV_RESET_PENDING */
  140. #define DL_SUBS_BIND_PND        0x14    /* Waiting ack of DL_SUBS_BIND_REQ */
  141. #define DL_SUBS_UNBIND_PND        0x15    /* Waiting ack of DL_SUBS_UNBIND_REQ */
  142.  
  143. /*
  144.  * DL_ERROR_ACK error return values
  145.  */
  146. #define DL_ACCESS        0x02    /* Improper permissions for request, LLI compatibility */
  147. #define DL_BADADDR        0x01    /* DLSAP address in improper format or invalid */
  148. #define DL_BADCORR        0x05    /* Sequence number not from outstanding DL_CONN_IND */
  149. #define DL_BADDATA        0x06    /* User data exceeded provider limit */
  150. #define DL_BADPPA        0x08    /* Specified PPA was invalid */
  151. #define DL_BADPRIM        0x09    /* Primitive received is not known by DLS provider */
  152. #define DL_BADQOSPARAM    0x0a    /* QOS parameters contained invalid values */
  153. #define DL_BADQOSTYPE    0x0b    /* QOS structure type is unknown or unsupported */
  154. #define DL_BADSAP        0x00    /* Bad LSAP selector, LLI compatibility */
  155. #define DL_BADTOKEN     0x0c    /* Token used not associated with an active stream */
  156. #define DL_BOUND        0x0d    /* Attempted second bind with dl_max_conind or    */
  157.                                 /*    dl_conn_mgmt > 0 on same DLSAP or PPA */
  158. #define DL_INITFAILED    0x0e    /* Physical Link initialization failed */
  159. #define DL_NOADDR        0x0f    /* Provider couldn't allocate alternate address */
  160. #define DL_NOTINIT        0x10    /* Physical Link not initialized */
  161. #define DL_OUTSTATE     0x03    /* Primitive issued in improper state, LLI compatibility */
  162. #define DL_SYSERR        0x04    /* UNIX system error occurred, LLI compatibility */
  163. #define DL_UNSUPPORTED    0x07    /* Requested service not supplied by provider */
  164. #define DL_UNDELIVERABLE 0x11    /* Previous data unit could not be delivered */
  165. #define DL_NOTSUPPORTED  0x12    /* Primitive is known but not supported by DLS provider */
  166. #define DL_TOOMANY        0x13    /* limit exceeded    */
  167. #define DL_NOTENAB        0x14    /* Promiscuous mode not enabled */
  168. #define DL_BUSY         0x15    /* Other streams for a particular PPA in the
  169.                                      post-attached state */
  170.  
  171. #define DL_NOAUTO        0x16    /* Automatic handling of XID & TEST responses
  172.                                    not supported */
  173. #define DL_NOXIDAUTO    0x17    /* Automatic handling of XID not supported */
  174. #define DL_NOTESTAUTO    0x18    /* Automatic handling of TEST not supported */
  175. #define DL_XIDAUTO        0x19    /* Automatic handling of XID response */
  176. #define DL_TESTAUTO     0x1a    /* AUtomatic handling of TEST response*/
  177. #define DL_PENDING        0x1b    /* pending outstanding connect indications */
  178.  
  179. /*
  180.  * DLPI media types supported
  181.  */
  182. #define DL_CSMACD    0x0     /* IEEE 802.3 CSMA/CD network, LLI Compatibility */
  183. #define DL_TPB        0x1     /* IEEE 802.4 Token Passing Bus, LLI Compatibility */
  184. #define DL_TPR        0x2     /* IEEE 802.5 Token Passing Ring, LLI Compatibility */
  185. #define DL_METRO    0x3     /* IEEE 802.6 Metro Net, LLI Compatibility */
  186. #define DL_ETHER    0x4     /* Ethernet Bus, LLI Compatibility */
  187. #define DL_HDLC     0x05    /* ISO HDLC protocol support, bit synchronous */
  188. #define DL_CHAR     0x06    /* Character Synchronous protocol support, eg BISYNC */
  189. #define DL_CTCA     0x07    /* IBM Channel-to-Channel Adapter */
  190. #define DL_FDDI     0x08    /* Fiber Distributed data interface */
  191. #define DL_OTHER    0x09    /* Any other medium not listed above */
  192.  
  193. /*
  194.  * DLPI provider service supported.
  195.  * These must be allowed to be bitwise-OR for dl_service_mode in
  196.  * DL_INFO_ACK.
  197.  */
  198. #define DL_CODLS    0x01    /* support connection-oriented service */
  199. #define DL_CLDLS    0x02    /* support connectionless data link service */
  200. #define DL_ACLDLS    0x04    /* support acknowledged connectionless service*/
  201.  
  202. /*
  203.  * DLPI provider style.
  204.  * The DLPI provider style which determines whether a provider
  205.  * requires a DL_ATTACH_REQ to inform the provider which PPA
  206.  * user messages should be sent/received on.
  207.  */
  208. #define DL_STYLE1    0x0500    /* PPA is implicitly bound by open(2) */
  209. #define DL_STYLE2    0x0501    /* PPA must be explicitly bound via DL_ATTACH_REQ */
  210.  
  211. /*
  212.  * DLPI Originator for Disconnect and Resets
  213.  */
  214. #define DL_PROVIDER     0x0700
  215. #define DL_USER         0x0701
  216.  
  217. /*
  218.  * DLPI Disconnect Reasons
  219.  */
  220. #define DL_CONREJ_DEST_UNKNOWN                0x0800
  221. #define DL_CONREJ_DEST_UNREACH_PERMANENT    0x0801
  222. #define DL_CONREJ_DEST_UNREACH_TRANSIENT    0x0802
  223. #define DL_CONREJ_QOS_UNAVAIL_PERMANENT     0x0803
  224. #define DL_CONREJ_QOS_UNAVAIL_TRANSIENT     0x0804
  225. #define DL_CONREJ_PERMANENT_COND            0x0805
  226. #define DL_CONREJ_TRANSIENT_COND            0x0806
  227. #define DL_DISC_ABNORMAL_CONDITION            0x0807
  228. #define DL_DISC_NORMAL_CONDITION            0x0808
  229. #define DL_DISC_PERMANENT_CONDITION         0x0809
  230. #define DL_DISC_TRANSIENT_CONDITION         0x080a
  231. #define DL_DISC_UNSPECIFIED                 0x080b
  232.  
  233. /*
  234.  * DLPI Reset Reasons
  235.  */
  236. #define DL_RESET_FLOW_CONTROL    0x0900
  237. #define DL_RESET_LINK_ERROR     0x0901
  238. #define DL_RESET_RESYNCH        0x0902
  239.  
  240. /*
  241.  * DLPI status values for acknowledged connectionless data transfer
  242.  */
  243. #define DL_CMD_MASK     0x0f    /* mask for command portion of status */
  244. #define DL_CMD_OK        0x00    /* Command Accepted */
  245. #define DL_CMD_RS        0x01    /* Unimplemented or inactivated service */
  246. #define DL_CMD_UE        0x05    /* Data Link User interface error */
  247. #define DL_CMD_PE        0x06    /* Protocol error */
  248. #define DL_CMD_IP        0x07    /* Permanent implementation dependent error*/
  249. #define DL_CMD_UN        0x09    /* Resources temporarily unavailable */
  250. #define DL_CMD_IT        0x0f    /* Temporary implementation dependent error */
  251. #define DL_RSP_MASK     0xf0    /* mask for response portion of status */
  252. #define DL_RSP_OK        0x00    /* Response DLSDU present */
  253. #define DL_RSP_RS        0x10    /* Unimplemented or inactivated service */
  254. #define DL_RSP_NE        0x30    /* Response DLSDU never submitted */
  255. #define DL_RSP_NR        0x40    /* Response DLSDU not requested */
  256. #define DL_RSP_UE        0x50    /* Data Link User interface error */
  257. #define DL_RSP_IP        0x70    /* Permanent implementation dependent error */
  258. #define DL_RSP_UN        0x90    /* Resources temporarily unavailable */
  259. #define DL_RSP_IT        0xf0    /* Temporary implementation dependent error */
  260.  
  261. /*
  262.  * Service Class values for acknowledged connectionless data transfer
  263.  */
  264. #define DL_RQST_RSP     0x01    /* Use acknowledge capability in MAC sublayer*/
  265. #define DL_RQST_NORSP    0x02    /* No acknowledgement service requested */
  266.  
  267. /*
  268.  * DLPI address type definition
  269.  */
  270. #define DL_FACT_PHYS_ADDR    0x01    /* factory physical address */
  271. #define DL_CURR_PHYS_ADDR    0x02    /* current physical address */
  272.  
  273. /*
  274.  * DLPI flag definitions
  275.  */
  276. #define DL_POLL_FINAL    0x01        /* if set,indicates poll/final bit set*/
  277.  
  278. /*
  279.  *    XID and TEST responses supported by the provider
  280.  */
  281. #define DL_AUTO_XID     0x01        /* provider will respond to XID */
  282. #define DL_AUTO_TEST    0x02        /* provider will respond to TEST */
  283.  
  284. /*
  285.  * Subsequent bind type
  286.  */
  287. #define DL_PEER_BIND            0x01    /* subsequent bind on a peer addr */
  288. #define DL_HIERARCHICAL_BIND    0x02    /* subs_bind on a hierarchical addr*/
  289.  
  290. /*
  291.  * DLPI promiscuous mode definitions
  292.  */
  293. #define DL_PROMISC_PHYS     0x01    /* promiscuous mode at phys level */
  294. #define DL_PROMISC_SAP        0x02    /* promiscous mode at sap level */
  295. #define DL_PROMISC_MULTI    0x03    /* promiscuous mode for multicast */
  296.  
  297. /*
  298.  * DLPI Quality Of Service definition for use in QOS structure definitions.
  299.  * The QOS structures are used in connection establishment, DL_INFO_ACK,
  300.  * and setting connectionless QOS values.
  301.  */
  302.  
  303. /*
  304.  * Throughput
  305.  *
  306.  * This parameter is specified for both directions.
  307.  */
  308. typedef struct 
  309. {
  310.         SInt32    dl_target_value;    /* desired bits/second desired */
  311.         SInt32    dl_accept_value;    /* min. acceptable bits/second */
  312. } dl_through_t;
  313.  
  314. /*
  315.  * transit delay specification
  316.  *
  317.  * This parameter is specified for both directions.
  318.  * expressed in milliseconds assuming a DLSDU size of 128 octets.
  319.  * The scaling of the value to the current DLSDU size is provider dependent.
  320.  */
  321. typedef struct 
  322. {
  323.         SInt32    dl_target_value;    /* desired value of service */
  324.         SInt32    dl_accept_value;    /* min. acceptable value of service */
  325. } dl_transdelay_t;
  326.  
  327. /*
  328.  * priority specification
  329.  * priority range is 0-100, with 0 being highest value.
  330.  */
  331. typedef struct 
  332. {
  333.         SInt32    dl_min;
  334.         SInt32    dl_max;
  335. } dl_priority_t;
  336.  
  337. /*
  338.  * protection specification
  339.  *
  340.  */
  341. #define DL_NONE         0x0B01    /* no protection supplied */
  342. #define DL_MONITOR        0x0B02    /* protection against passive monitoring */
  343. #define DL_MAXIMUM        0x0B03    /* protection against modification, replay, */
  344.                                 /* addition, or deletion */
  345.  
  346. typedef struct 
  347. {
  348.         SInt32    dl_min;
  349.         SInt32    dl_max;
  350. } dl_protect_t;
  351.  
  352. /*
  353.  * Resilience specification
  354.  * probabilities are scaled by a factor of 10,000 with a time interval
  355.  * of 10,000 seconds.
  356.  */
  357. typedef struct 
  358. {
  359.         SInt32    dl_disc_prob;    /* probability of provider init DISC */
  360.         SInt32    dl_reset_prob;    /* probability of provider init RESET */
  361. } dl_resilience_t;
  362.  
  363. /*
  364.  * QOS type definition to be used for negotiation with the
  365.  * remote end of a connection, or a connectionless unitdata request.
  366.  * There are two type definitions to handle the negotiation 
  367.  * process at connection establishment. The typedef dl_qos_range_t
  368.  * is used to present a range for parameters. This is used
  369.  * in the DL_CONNECT_REQ and DL_CONNECT_IND messages. The typedef
  370.  * dl_qos_sel_t is used to select a specific value for the QOS
  371.  * parameters. This is used in the DL_CONNECT_RES, DL_CONNECT_CON,
  372.  * and DL_INFO_ACK messages to define the selected QOS parameters
  373.  * for a connection.
  374.  *
  375.  * NOTE
  376.  *    A DataLink provider which has unknown values for any of the fields
  377.  *    will use a value of DL_UNKNOWN for all values in the fields.
  378.  *
  379.  * NOTE
  380.  *    A QOS parameter value of DL_QOS_DONT_CARE informs the DLS
  381.  *    provider the user requesting this value doesn't care 
  382.  *    what the QOS parameter is set to. This value becomes the
  383.  *    least possible value in the range of QOS parameters.
  384.  *    The order of the QOS parameter range is then:
  385.  *
  386.  *        DL_QOS_DONT_CARE < 0 < MAXIMUM QOS VALUE
  387.  */
  388. #define DL_UNKNOWN        -1
  389. #define DL_QOS_DONT_CARE    -2
  390.  
  391. /*
  392.  * Every QOS structure has the first 4 bytes containing a type
  393.  * field, denoting the definition of the rest of the structure.
  394.  * This is used in the same manner has the dl_primitive variable
  395.  * is in messages.
  396.  *
  397.  * The following list is the defined QOS structure type values and structures.
  398.  */
  399. #define DL_QOS_CO_RANGE1    0x0101    /* QOS range struct. for Connection modeservice */
  400. #define DL_QOS_CO_SEL1        0x0102    /* QOS selection structure */
  401. #define DL_QOS_CL_RANGE1    0x0103    /* QOS range struct. for connectionless*/
  402. #define DL_QOS_CL_SEL1        0x0104    /* QOS selection for connectionless mode*/
  403.  
  404. typedef struct 
  405. {
  406.         UInt32            dl_qos_type;
  407.         dl_through_t    dl_rcv_throughput;    /* desired and acceptable*/
  408.         dl_transdelay_t dl_rcv_trans_delay; /* desired and acceptable*/
  409.         dl_through_t    dl_xmt_throughput;
  410.         dl_transdelay_t dl_xmt_trans_delay;
  411.         dl_priority_t    dl_priority;        /* min and max values */
  412.         dl_protect_t    dl_protection;        /* min and max values */
  413.         SInt32            dl_residual_error;
  414.         dl_resilience_t dl_resilience;
  415. }    dl_qos_co_range1_t;
  416.  
  417. typedef struct 
  418. {
  419.         UInt32            dl_qos_type;
  420.         SInt32            dl_rcv_throughput;
  421.         SInt32            dl_rcv_trans_delay;
  422.         SInt32            dl_xmt_throughput;
  423.         SInt32            dl_xmt_trans_delay;
  424.         SInt32            dl_priority;
  425.         SInt32            dl_protection;
  426.         SInt32            dl_residual_error;
  427.         dl_resilience_t    dl_resilience;
  428. }    dl_qos_co_sel1_t;
  429.  
  430. typedef struct 
  431. {
  432.         UInt32            dl_qos_type;
  433.         dl_transdelay_t dl_trans_delay;
  434.         dl_priority_t    dl_priority;
  435.         dl_protect_t    dl_protection;
  436.         SInt32            dl_residual_error;
  437. }    dl_qos_cl_range1_t;
  438.  
  439. typedef struct 
  440. {
  441.         UInt32        dl_qos_type;
  442.         SInt32        dl_trans_delay;
  443.         SInt32        dl_priority;
  444.         SInt32        dl_protection;
  445.         SInt32        dl_residual_error;
  446. }    dl_qos_cl_sel1_t;
  447.  
  448. /*
  449.  * DLPI interface primitive definitions.
  450.  *
  451.  * Each primitive is sent as a stream message.    It is possible that
  452.  * the messages may be viewed as a sequence of bytes that have the
  453.  * following form without any padding. The structure definition
  454.  * of the following messages may have to change depending on the
  455.  * underlying hardware architecture and crossing of a hardware
  456.  * boundary with a different hardware architecture.
  457.  *
  458.  * Fields in the primitives having a name of the form
  459.  * dl_reserved cannot be used and have the value of
  460.  * binary zero, no bits turned on.
  461.  *
  462.  * Each message has the name defined followed by the
  463.  * stream message type (M_PROTO, M_PCPROTO, M_DATA)
  464.  */
  465.  
  466. /*
  467.  *    LOCAL MANAGEMENT SERVICE PRIMITIVES
  468.  */
  469.  
  470. /*
  471.  * DL_INFO_REQ, M_PCPROTO type
  472.  */
  473. typedef struct 
  474. {
  475.     UInt32    dl_primitive;            /* set to DL_INFO_REQ */
  476. } dl_info_req_t;
  477.  
  478. /*
  479.  * DL_INFO_ACK, M_PCPROTO type
  480.  */
  481. typedef struct 
  482. {
  483.     UInt32        dl_primitive;            /* set to DL_INFO_ACK */
  484.     UInt32        dl_max_sdu;             /* Max bytes in a DLSDU */
  485.     UInt32        dl_min_sdu;             /* Min bytes in a DLSDU */
  486.     UInt32        dl_addr_length;         /* length of DLSAP address */
  487.     UInt32        dl_mac_type;            /* type of medium supported*/
  488.     UInt32        dl_reserved;            /* value set to zero */
  489.     UInt32        dl_current_state;        /* state of DLPI interface */
  490.     SInt32        dl_sap_length;            /* current length of SAP part of
  491.                                            dlsap address */
  492.     UInt32        dl_service_mode;        /* CO, CL or ACL */
  493.     UInt32        dl_qos_length;            /* length of qos values */
  494.     UInt32        dl_qos_offset;            /* offset from beg. of block*/
  495.     UInt32        dl_qos_range_length;    /* available range of qos */
  496.     UInt32        dl_qos_range_offset;    /* offset from beg. of block*/
  497.     UInt32        dl_provider_style;        /* style1 or style2 */
  498.     UInt32        dl_addr_offset;         /* offset of the dlsap addr */
  499.     UInt32        dl_version;             /* version number */
  500.     UInt32        dl_brdcst_addr_length;    /* length of broadcast addr */
  501.     UInt32        dl_brdcst_addr_offset;    /* offset from beg. of block*/
  502.     UInt32        dl_growth;                /* set to zero */
  503. } dl_info_ack_t;
  504.  
  505. /*
  506.  * DL_ATTACH_REQ, M_PROTO type
  507.  */
  508. typedef struct 
  509. {
  510.     UInt32        dl_primitive;        /* set to DL_ATTACH_REQ*/
  511.     UInt32        dl_ppa;             /* id of the PPA */
  512. } dl_attach_req_t;
  513.  
  514. /*
  515.  * DL_DETACH_REQ, M_PROTO type
  516.  */
  517. typedef struct 
  518. {
  519.     UInt32    dl_primitive;            /* set to DL_DETACH_REQ */
  520. } dl_detach_req_t;
  521.  
  522. /*
  523.  * DL_BIND_REQ, M_PROTO type
  524.  */
  525. typedef struct 
  526. {
  527.     UInt32    dl_primitive;        /* set to DL_BIND_REQ */
  528.     UInt32    dl_sap;             /* info to identify dlsap addr*/
  529.     UInt32    dl_max_conind;        /* max # of outstanding con_ind*/
  530.     UInt16    dl_service_mode;    /* CO, CL or ACL */     
  531.     UInt16    dl_conn_mgmt;        /* if non-zero, is con-mgmt stream*/
  532.     UInt32    dl_xidtest_flg;     /* if set to 1 indicates automatic
  533.                                    initiation of test and xid frames */
  534. } dl_bind_req_t;
  535.  
  536. /*
  537.  * DL_BIND_ACK, M_PCPROTO type
  538.  */
  539. typedef struct 
  540. {
  541.     UInt32    dl_primitive;        /* DL_BIND_ACK */
  542.     UInt32    dl_sap;             /* DLSAP addr info */
  543.     UInt32    dl_addr_length;     /* length of complete DLSAP addr */
  544.     UInt32    dl_addr_offset;     /* offset from beginning of M_PCPROTO*/
  545.     UInt32    dl_max_conind;        /* allowed max. # of con-ind */
  546.     UInt32    dl_xidtest_flg;     /* responses supported by provider*/
  547. } dl_bind_ack_t;
  548.  
  549. /*
  550.  * DL_SUBS_BIND_REQ, M_PROTO type
  551.  */
  552. typedef struct 
  553. {
  554.     UInt32    dl_primitive;            /* DL_SUBS_BIND_REQ */
  555.     UInt32    dl_subs_sap_offset;     /* offset of subs_sap */
  556.     UInt32    dl_subs_sap_length;     /* length of subs_sap */
  557.     UInt32    dl_subs_bind_class;     /* peer or hierarchical */
  558. } dl_subs_bind_req_t;
  559.  
  560. /*
  561.  * DL_SUBS_BIND_ACK, M_PCPROTO type
  562.  */
  563. typedef struct 
  564. {
  565.     UInt32 dl_primitive;         /* DL_SUBS_BIND_ACK */
  566.     UInt32 dl_subs_sap_offset;    /* offset of subs_sap */
  567.     UInt32 dl_subs_sap_length;    /* length of subs_sap */
  568. } dl_subs_bind_ack_t;
  569.  
  570. /*
  571.  * DL_UNBIND_REQ, M_PROTO type
  572.  */
  573. typedef struct 
  574. {
  575.     UInt32    dl_primitive;        /* DL_UNBIND_REQ */
  576. } dl_unbind_req_t;
  577.  
  578. /*
  579.  * DL_SUBS_UNBIND_REQ, M_PROTO type
  580.  */
  581. typedef struct 
  582. {
  583.     UInt32    dl_primitive;            /* DL_SUBS_UNBIND_REQ */
  584.     UInt32    dl_subs_sap_offset;     /* offset of subs_sap */
  585.     UInt32    dl_subs_sap_length;     /* length of subs_sap */
  586. } dl_subs_unbind_req_t;
  587.  
  588. /*
  589.  * DL_OK_ACK, M_PCPROTO type
  590.  */
  591. typedef struct 
  592. {
  593.     UInt32    dl_primitive;            /* DL_OK_ACK */
  594.     UInt32    dl_correct_primitive;    /* primitive being acknowledged */
  595. } dl_ok_ack_t;
  596.  
  597. /*
  598.  * DL_ERROR_ACK, M_PCPROTO type
  599.  */
  600. typedef struct 
  601. {
  602.     UInt32    dl_primitive;            /* DL_ERROR_ACK */
  603.     UInt32    dl_error_primitive;     /* primitive in error */
  604.     UInt32    dl_errno;                /* DLPI error code */
  605.     UInt32    dl_unix_errno;            /* UNIX system error code */
  606. } dl_error_ack_t;
  607.  
  608. /*
  609.  * DL_ENABMULTI_REQ, M_PROTO type
  610.  */
  611. typedef struct 
  612. {
  613.     UInt32    dl_primitive;        /* DL_ENABMULTI_REQ */
  614.     UInt32    dl_addr_length;     /* length of multicast address */
  615.     UInt32    dl_addr_offset;     /* offset from beg. of M_PROTO block*/
  616. } dl_enabmulti_req_t;
  617.  
  618. /*
  619.  * DL_DISABMULTI_REQ, M_PROTO type
  620.  */
  621.  
  622. typedef struct 
  623. {
  624.     UInt32    dl_primitive;        /* DL_DISABMULTI_REQ */
  625.     UInt32    dl_addr_length;     /* length of multicast address */
  626.     UInt32    dl_addr_offset;     /* offset from beg. of M_PROTO block*/
  627. } dl_disabmulti_req_t;
  628.  
  629. /*
  630.  * DL_PROMISCON_REQ, M_PROTO type
  631.  */
  632.  
  633. typedef struct 
  634. {
  635.     UInt32    dl_primitive;        /* DL_PROMISCON_REQ */
  636.     UInt32    dl_level;            /* physical,SAP level or ALL multicast*/
  637. } dl_promiscon_req_t;
  638.  
  639. /*
  640.  * DL_PROMISCOFF_REQ, M_PROTO type
  641.  */
  642.  
  643. typedef struct 
  644. {
  645.     UInt32    dl_primitive;        /* DL_PROMISCOFF_REQ */
  646.     UInt32    dl_level;            /* Physical,SAP level or ALL multicast*/
  647. } dl_promiscoff_req_t;
  648.  
  649. /*
  650.  *    Primitives to get and set the Physical address
  651.  */
  652.  
  653. /*
  654.  * DL_PHYS_ADDR_REQ, M_PROTO type
  655.  */
  656. typedef struct 
  657. {
  658.     UInt32    dl_primitive;        /* DL_PHYS_ADDR_REQ */
  659.     UInt32    dl_addr_type;        /* factory or current physical addr */
  660. } dl_phys_addr_req_t;
  661.  
  662. /*
  663.  * DL_PHYS_ADDR_ACK, M_PCPROTO type
  664.  */
  665. typedef struct 
  666. {
  667.     UInt32    dl_primitive;        /* DL_PHYS_ADDR_ACK */
  668.     UInt32    dl_addr_length;     /* length of the physical addr */
  669.     UInt32    dl_addr_offset;     /* offset from beg. of block */
  670. } dl_phys_addr_ack_t;
  671.  
  672. /*
  673.  * DL_SET_PHYS_ADDR_REQ, M_PROTO type
  674.  */
  675. typedef struct 
  676. {
  677.     UInt32    dl_primitive;        /* DL_SET_PHYS_ADDR_REQ */
  678.     UInt32    dl_addr_length;     /* length of physical addr */
  679.     UInt32    dl_addr_offset;     /* offset from beg. of block */
  680. } dl_set_phys_addr_req_t;
  681.  
  682. /*
  683.  *    Primitives to get statistics
  684.  */
  685.  
  686. /*
  687.  * DL_GET_STATISTICS_REQ, M_PROTO type
  688.  */
  689. typedef struct 
  690. {
  691.     UInt32    dl_primitive;        /* DL_GET_STATISTICS_REQ */
  692. } dl_get_statistics_req_t;
  693.  
  694. /*
  695.  * DL_GET_STATISTICS_ACK, M_PCPROTO type
  696.  */
  697. typedef struct 
  698. {
  699.     UInt32    dl_primitive;        /* DL_GET_STATISTICS_ACK */
  700.     UInt32    dl_stat_length;     /* length of statistics structure*/
  701.     UInt32    dl_stat_offset;     /* offset from beg. of block */
  702. } dl_get_statistics_ack_t;
  703.  
  704. /*
  705.  *    CONNECTION-ORIENTED SERVICE PRIMITIVES
  706.  */
  707.  
  708. /*
  709.  * DL_CONNECT_REQ, M_PROTO type
  710.  */
  711. typedef struct 
  712. {
  713.     UInt32    dl_primitive;            /* DL_CONNECT_REQ */
  714.     UInt32    dl_dest_addr_length;    /* len. of dlsap addr*/
  715.     UInt32    dl_dest_addr_offset;    /* offset */
  716.     UInt32    dl_qos_length;            /* len. of QOS parm val*/
  717.     UInt32    dl_qos_offset;            /* offset */
  718.     UInt32    dl_growth;                /* set to zero */
  719. } dl_connect_req_t;
  720.  
  721. /*
  722.  * DL_CONNECT_IND, M_PROTO type
  723.  */
  724. typedef struct 
  725. {
  726.     UInt32    dl_primitive;            /* DL_CONNECT_IND */
  727.     UInt32    dl_correlation;         /* provider's correlation token*/
  728.     UInt32    dl_called_addr_length;    /* length of called address */
  729.     UInt32    dl_called_addr_offset;    /* offset from beginning of block */
  730.     UInt32    dl_calling_addr_length; /* length of calling address */
  731.     UInt32    dl_calling_addr_offset; /* offset from beginning of block */
  732.     UInt32    dl_qos_length;            /* length of qos structure */
  733.     UInt32    dl_qos_offset;            /* offset from beginning of block */
  734.     UInt32    dl_growth;                /* set to zero */
  735. } dl_connect_ind_t;
  736.  
  737. /*
  738.  * DL_CONNECT_RES, M_PROTO type
  739.  */
  740. typedef struct 
  741. {
  742.     UInt32    dl_primitive;    /* DL_CONNECT_RES */
  743.     UInt32    dl_correlation; /* provider's correlation token */
  744.     UInt32    dl_resp_token;    /* token associated with responding stream */
  745.     UInt32    dl_qos_length;    /* length of qos structure */
  746.     UInt32    dl_qos_offset;    /* offset from beginning of block */
  747.     UInt32    dl_growth;        /* set to zero */
  748. } dl_connect_res_t;
  749.  
  750. /*
  751.  * DL_CONNECT_CON, M_PROTO type
  752.  */
  753. typedef struct 
  754. {
  755.     UInt32    dl_primitive;            /* DL_CONNECT_CON*/
  756.     UInt32    dl_resp_addr_length;    /* length of responder's address */
  757.     UInt32    dl_resp_addr_offset;    /* offset from beginning of block*/
  758.     UInt32    dl_qos_length;            /* length of qos structure */
  759.     UInt32    dl_qos_offset;            /* offset from beginning of block*/
  760.     UInt32    dl_growth;                /* set to zero */
  761. } dl_connect_con_t;
  762.  
  763. /*
  764.  * DL_TOKEN_REQ, M_PCPROTO type
  765.  */
  766. typedef struct 
  767. {
  768.     UInt32    dl_primitive;        /* DL_TOKEN_REQ */
  769. } dl_token_req_t;
  770.  
  771. /*
  772.  * DL_TOKEN_ACK, M_PCPROTO type
  773.  */
  774. typedef struct 
  775. {
  776.     UInt32    dl_primitive;    /* DL_TOKEN_ACK */
  777.     UInt32    dl_token;        /* Connection response token associated
  778.                                with the stream */
  779. }dl_token_ack_t;
  780.  
  781. /*
  782.  * DL_DISCONNECT_REQ, M_PROTO type
  783.  */
  784. typedef struct 
  785. {
  786.     UInt32        dl_primitive;    /* DL_DISCONNECT_REQ */
  787.     UInt32        dl_reason;        /*normal, abnormal, perm. or transient*/
  788.     UInt32        dl_correlation; /* association with connect_ind */
  789. } dl_disconnect_req_t;
  790.  
  791. /*
  792.  * DL_DISCONNECT_IND, M_PROTO type
  793.  */
  794. typedef struct 
  795. {
  796.     UInt32    dl_primitive;        /* DL_DISCONNECT_IND */
  797.     UInt32    dl_originator;        /* USER or PROVIDER */
  798.     UInt32    dl_reason;            /* permanent or transient */
  799.     UInt32    dl_correlation;     /* association with connect_ind */
  800. } dl_disconnect_ind_t;
  801.  
  802. /*
  803.  * DL_RESET_REQ, M_PROTO type
  804.  */
  805. typedef struct 
  806. {
  807.     UInt32    dl_primitive;        /* DL_RESET_REQ */
  808. } dl_reset_req_t;
  809.  
  810. /*
  811.  * DL_RESET_IND, M_PROTO type
  812.  */
  813. typedef struct 
  814. {
  815.     UInt32    dl_primitive;        /* DL_RESET_IND */
  816.     UInt32    dl_originator;        /* Provider or User */
  817.     UInt32    dl_reason;            /* flow control, link error or resynch*/
  818. } dl_reset_ind_t;
  819.  
  820. /*
  821.  * DL_RESET_RES, M_PROTO type
  822.  */
  823. typedef struct 
  824. {
  825.     UInt32    dl_primitive;        /* DL_RESET_RES */
  826. } dl_reset_res_t;
  827.  
  828. /*
  829.  * DL_RESET_CON, M_PROTO type
  830.  */
  831. typedef struct 
  832. {
  833.     UInt32    dl_primitive;        /* DL_RESET_CON */
  834. } dl_reset_con_t;
  835.  
  836. /*
  837.  *    CONNECTIONLESS SERVICE PRIMITIVES
  838.  */
  839.  
  840. /*
  841.  * DL_UNITDATA_REQ, M_PROTO type, with M_DATA block(s)
  842.  */
  843. typedef struct 
  844. {
  845.     UInt32    dl_primitive;            /* DL_UNITDATA_REQ */
  846.     UInt32    dl_dest_addr_length;    /* DLSAP length of dest. user */
  847.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  848.     dl_priority_t    dl_priority;    /* priority value */
  849. } dl_unitdata_req_t;
  850.  
  851. /*
  852.  * DL_UNITDATA_IND, M_PROTO type, with M_DATA block(s)
  853.  */
  854. typedef struct 
  855. {
  856.     UInt32    dl_primitive;            /* DL_UNITDATA_IND */
  857.     UInt32    dl_dest_addr_length;    /* DLSAP length of dest. user */
  858.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  859.     UInt32    dl_src_addr_length;     /* DLSAP addr length of sending user*/
  860.     UInt32    dl_src_addr_offset;     /* offset from beg. of block */
  861.     UInt32    dl_group_address;        /* set to one if multicast/broadcast*/
  862. } dl_unitdata_ind_t;
  863.  
  864. /*
  865.  * DL_UDERROR_IND, M_PROTO type
  866.  *    (or M_PCPROTO type if LLI-based provider)
  867.  */
  868. typedef struct 
  869. {
  870.     UInt32    dl_primitive;            /* DL_UDERROR_IND */
  871.     UInt32    dl_dest_addr_length;    /* Destination DLSAP */
  872.     UInt32    dl_dest_addr_offset;    /* Offset from beg. of block */
  873.     UInt32    dl_unix_errno;            /* unix system error code*/
  874.     UInt32    dl_errno;                /* DLPI error code */
  875. } dl_uderror_ind_t;
  876.  
  877. /*
  878.  * DL_UDQOS_REQ, M_PROTO type
  879.  */
  880. typedef struct 
  881. {
  882.     UInt32    dl_primitive;        /* DL_UDQOS_REQ */
  883.     UInt32    dl_qos_length;        /* length in bytes of requested qos*/
  884.     UInt32    dl_qos_offset;        /* offset from beg. of block */
  885. } dl_udqos_req_t;
  886.  
  887. /*
  888.  *    Primitives to handle XID and TEST operations
  889.  */
  890.  
  891. /*
  892.  * DL_TEST_REQ, M_PROTO type
  893.  */
  894. typedef struct 
  895. {
  896.     UInt32    dl_primitive;            /* DL_TEST_REQ */
  897.     UInt32    dl_flag;                /* poll/final */
  898.     UInt32    dl_dest_addr_length;    /* DLSAP length of dest. user */
  899.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  900. } dl_test_req_t;
  901.  
  902. /*
  903.  * DL_TEST_IND, M_PROTO type
  904.  */
  905. typedef struct 
  906. {
  907.     UInt32    dl_primitive;            /* DL_TEST_IND */
  908.     UInt32    dl_flag;                /* poll/final */
  909.     UInt32    dl_dest_addr_length;    /* dlsap length of dest. user */
  910.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  911.     UInt32    dl_src_addr_length;     /* dlsap length of source user */
  912.     UInt32    dl_src_addr_offset;     /* offset from beg. of block */
  913. } dl_test_ind_t;
  914.  
  915. /*
  916.  *    DL_TEST_RES, M_PROTO type
  917.  */
  918. typedef struct 
  919. {
  920.     UInt32    dl_primitive;            /* DL_TEST_RES */
  921.     UInt32    dl_flag;                /* poll/final */
  922.     UInt32    dl_dest_addr_length;    /* DLSAP length of dest. user */
  923.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  924. } dl_test_res_t;
  925.  
  926. /*
  927.  *    DL_TEST_CON, M_PROTO type
  928.  */
  929. typedef struct 
  930. {
  931.     UInt32    dl_primitive;            /* DL_TEST_CON */
  932.     UInt32    dl_flag;                /* poll/final */
  933.     UInt32    dl_dest_addr_length;    /* dlsap length of dest. user */
  934.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  935.     UInt32    dl_src_addr_length;     /* dlsap length of source user */
  936.     UInt32    dl_src_addr_offset;     /* offset from beg. of block */
  937. } dl_test_con_t;
  938.  
  939. /*
  940.  * DL_XID_REQ, M_PROTO type
  941.  */
  942. typedef struct 
  943. {
  944.     UInt32    dl_primitive;            /* DL_XID_REQ */
  945.     UInt32    dl_flag;                /* poll/final */
  946.     UInt32    dl_dest_addr_length;    /* dlsap length of dest. user */
  947.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  948. } dl_xid_req_t;
  949.  
  950. /*
  951.  * DL_XID_IND, M_PROTO type
  952.  */
  953. typedef struct 
  954. {
  955.     UInt32    dl_primitive;            /* DL_XID_IND */
  956.     UInt32    dl_flag;                /* poll/final */
  957.     UInt32    dl_dest_addr_length;    /* dlsap length of dest. user */
  958.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  959.     UInt32    dl_src_addr_length;     /* dlsap length of source user */
  960.     UInt32    dl_src_addr_offset;     /* offset from beg. of block */
  961. } dl_xid_ind_t;
  962.  
  963. /*
  964.  *    DL_XID_RES, M_PROTO type
  965.  */
  966. typedef struct 
  967. {
  968.     UInt32    dl_primitive;            /* DL_XID_RES */
  969.     UInt32    dl_flag;                /* poll/final */
  970.     UInt32    dl_dest_addr_length;    /* DLSAP length of dest. user */
  971.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  972. } dl_xid_res_t;
  973.  
  974. /*
  975.  *    DL_XID_CON, M_PROTO type
  976.  */
  977. typedef struct 
  978. {
  979.     UInt32    dl_primitive;            /* DL_XID_CON */
  980.     UInt32    dl_flag;                /* poll/final */
  981.     UInt32    dl_dest_addr_length;    /* dlsap length of dest. user */
  982.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  983.     UInt32    dl_src_addr_length;     /* dlsap length of source user */
  984.     UInt32    dl_src_addr_offset;     /* offset from beg. of block */
  985. } dl_xid_con_t;
  986.  
  987. /*
  988.  *    ACKNOWLEDGED CONNECTIONLESS SERVICE PRIMITIVES
  989.  */
  990.  
  991. /*
  992.  * DL_DATA_ACK_REQ, M_PROTO type
  993.  */
  994. typedef struct 
  995. {
  996.     UInt32    dl_primitive;            /* DL_DATA_ACK_REQ */
  997.     UInt32    dl_correlation;         /* User's correlation token */
  998.     UInt32    dl_dest_addr_length;    /* length of destination addr */
  999.     UInt32    dl_dest_addr_offset;    /* offset from beginning of block */
  1000.     UInt32    dl_src_addr_length;     /* length of source address */
  1001.     UInt32    dl_src_addr_offset;     /* offset from beginning of block */
  1002.     UInt32    dl_priority;            /* priority */
  1003.     UInt32    dl_service_class;        /* DL_RQST_RSP or DL_RQST_NORSP */
  1004. } dl_data_ack_req_t;
  1005.  
  1006. /*
  1007.  * DL_DATA_ACK_IND, M_PROTO type
  1008.  */
  1009. typedef struct 
  1010. {
  1011.     UInt32    dl_primitive;            /* DL_DATA_ACK_IND */
  1012.     UInt32    dl_dest_addr_length;    /* length of destination addr */
  1013.     UInt32    dl_dest_addr_offset;    /* offset from beginning of block */
  1014.     UInt32    dl_src_addr_length;     /* length of source address */
  1015.     UInt32    dl_src_addr_offset;     /* offset from beginning of block */
  1016.     UInt32    dl_priority;            /* priority for data unit transm. */
  1017.     UInt32    dl_service_class;        /* DL_RQST_RSP or DL_RQST_NORSP */
  1018. } dl_data_ack_ind_t;
  1019.  
  1020. /*
  1021.  * DL_DATA_ACK_STATUS_IND, M_PROTO type
  1022.  */
  1023. typedef struct 
  1024. {
  1025.     UInt32    dl_primitive;        /* DL_DATA_ACK_STATUS_IND */
  1026.     UInt32    dl_correlation;     /* User's correlation token */
  1027.     UInt32    dl_status;            /* success or failure of previous req*/
  1028. } dl_data_ack_status_ind_t;
  1029.  
  1030. /*
  1031.  * DL_REPLY_REQ, M_PROTO type
  1032.  */
  1033. typedef struct 
  1034. {
  1035.     UInt32    dl_primitive;            /* DL_REPLY_REQ */
  1036.     UInt32    dl_correlation;         /* User's correlation token */
  1037.     UInt32    dl_dest_addr_length;    /* length of destination address */
  1038.     UInt32    dl_dest_addr_offset;    /* offset from beginning of block */
  1039.     UInt32    dl_src_addr_length;     /* source address length */
  1040.     UInt32    dl_src_addr_offset;     /* offset from beginning of block */
  1041.     UInt32    dl_priority;            /* priority for data unit transmission*/
  1042.     UInt32    dl_service_class;
  1043. } dl_reply_req_t;
  1044.  
  1045. /*
  1046.  * DL_REPLY_IND, M_PROTO type
  1047.  */
  1048. typedef struct 
  1049. {
  1050.     UInt32    dl_primitive;            /* DL_REPLY_IND */
  1051.     UInt32    dl_dest_addr_length;    /* length of destination address */
  1052.     UInt32    dl_dest_addr_offset;    /* offset from beginning of block*/
  1053.     UInt32    dl_src_addr_length;     /* length of source address */
  1054.     UInt32    dl_src_addr_offset;     /* offset from beginning of block */
  1055.     UInt32    dl_priority;            /* priority for data unit transmission*/
  1056.     UInt32    dl_service_class;        /* DL_RQST_RSP or DL_RQST_NORSP */
  1057. } dl_reply_ind_t;
  1058.  
  1059. /*
  1060.  * DL_REPLY_STATUS_IND, M_PROTO type
  1061.  */
  1062. typedef struct 
  1063. {
  1064.     UInt32    dl_primitive;        /* DL_REPLY_STATUS_IND */
  1065.     UInt32    dl_correlation;     /* User's correlation token */
  1066.     UInt32    dl_status;            /* success or failure of previous req*/
  1067. } dl_reply_status_ind_t;
  1068.  
  1069. /*
  1070.  * DL_REPLY_UPDATE_REQ, M_PROTO type
  1071.  */
  1072. typedef struct 
  1073. {
  1074.     UInt32    dl_primitive;            /* DL_REPLY_UPDATE_REQ */
  1075.     UInt32    dl_correlation;         /* user's correlation token */
  1076.     UInt32    dl_src_addr_length;     /* length of source address */
  1077.     UInt32    dl_src_addr_offset;     /* offset from beginning of block */
  1078. } dl_reply_update_req_t;
  1079.  
  1080. /*
  1081.  * DL_REPLY_UPDATE_STATUS_IND, M_PROTO type
  1082.  */
  1083. typedef struct 
  1084. {
  1085.     UInt32    dl_primitive;        /* DL_REPLY_UPDATE_STATUS_IND */
  1086.     UInt32    dl_correlation;     /* User's correlation token */
  1087.     UInt32    dl_status;            /* success or failure of previous req*/
  1088. } dl_reply_update_status_ind_t;
  1089.  
  1090. union DL_primitives 
  1091. {
  1092.     UInt32                dl_primitive;
  1093.     dl_info_req_t        info_req;
  1094.     dl_info_ack_t        info_ack;
  1095.     dl_attach_req_t     attach_req;
  1096.     dl_detach_req_t     detach_req;
  1097.     dl_bind_req_t        bind_req;
  1098.     dl_bind_ack_t        bind_ack;
  1099.     dl_unbind_req_t     unbind_req;
  1100.     dl_subs_bind_req_t    subs_bind_req;
  1101.     dl_subs_bind_ack_t    subs_bind_ack;
  1102.     dl_subs_unbind_req_t    subs_unbind_req;
  1103.     dl_ok_ack_t         ok_ack;
  1104.     dl_error_ack_t        error_ack;
  1105.     dl_connect_req_t    connect_req;
  1106.     dl_connect_ind_t    connect_ind;
  1107.     dl_connect_res_t    connect_res;
  1108.     dl_connect_con_t    connect_con;
  1109.     dl_token_req_t        token_req;
  1110.     dl_token_ack_t        token_ack;
  1111.     dl_disconnect_req_t disconnect_req;
  1112.     dl_disconnect_ind_t disconnect_ind;
  1113.     dl_reset_req_t        reset_req;
  1114.     dl_reset_ind_t        reset_ind;
  1115.     dl_reset_res_t        reset_res;
  1116.     dl_reset_con_t        reset_con;
  1117.     dl_unitdata_req_t    unitdata_req;
  1118.     dl_unitdata_ind_t    unitdata_ind;
  1119.     dl_uderror_ind_t    uderror_ind;
  1120.     dl_udqos_req_t        udqos_req;
  1121.     dl_enabmulti_req_t    enabmulti_req;
  1122.     dl_disabmulti_req_t disabmulti_req;
  1123.     dl_promiscon_req_t    promiscon_req;
  1124.     dl_promiscoff_req_t promiscoff_req;
  1125.     dl_phys_addr_req_t    physaddr_req;
  1126.     dl_phys_addr_ack_t    physaddr_ack;
  1127.     dl_set_phys_addr_req_t    set_physaddr_req;
  1128.     dl_get_statistics_req_t get_statistics_req;
  1129.     dl_get_statistics_ack_t get_statistics_ack;
  1130.     dl_test_req_t        test_req;
  1131.     dl_test_ind_t        test_ind;
  1132.     dl_test_res_t        test_res;
  1133.     dl_test_con_t        test_con;
  1134.     dl_xid_req_t        xid_req;
  1135.     dl_xid_ind_t        xid_ind;
  1136.     dl_xid_res_t        xid_res;
  1137.     dl_xid_con_t        xid_con;
  1138.     dl_data_ack_req_t    data_ack_req;
  1139.     dl_data_ack_ind_t    data_ack_ind;
  1140.     dl_data_ack_status_ind_t    data_ack_status_ind;
  1141.     dl_reply_req_t        reply_req;
  1142.     dl_reply_ind_t        reply_ind;
  1143.     dl_reply_status_ind_t    reply_status_ind;
  1144.     dl_reply_update_req_t    reply_update_req;
  1145.     dl_reply_update_status_ind_t    reply_update_status_ind;
  1146. };
  1147.  
  1148. #define DL_INFO_REQ_SIZE    sizeof(dl_info_req_t)
  1149. #define DL_INFO_ACK_SIZE    sizeof(dl_info_ack_t)
  1150. #define DL_ATTACH_REQ_SIZE    sizeof(dl_attach_req_t)
  1151. #define DL_DETACH_REQ_SIZE    sizeof(dl_detach_req_t)
  1152. #define DL_BIND_REQ_SIZE    sizeof(dl_bind_req_t)
  1153. #define DL_BIND_ACK_SIZE    sizeof(dl_bind_ack_t)
  1154. #define DL_UNBIND_REQ_SIZE    sizeof(dl_unbind_req_t)
  1155. #define DL_SUBS_BIND_REQ_SIZE    sizeof(dl_subs_bind_req_t)
  1156. #define DL_SUBS_BIND_ACK_SIZE    sizeof(dl_subs_bind_ack_t)
  1157. #define DL_SUBS_UNBIND_REQ_SIZE sizeof(dl_subs_unbind_req_t)
  1158. #define DL_OK_ACK_SIZE        sizeof(dl_ok_ack_t)
  1159. #define DL_ERROR_ACK_SIZE    sizeof(dl_error_ack_t)
  1160. #define DL_CONNECT_REQ_SIZE     sizeof(dl_connect_req_t)
  1161. #define DL_CONNECT_IND_SIZE     sizeof(dl_connect_ind_t)
  1162. #define DL_CONNECT_RES_SIZE     sizeof(dl_connect_res_t)
  1163. #define DL_CONNECT_CON_SIZE     sizeof(dl_connect_con_t)
  1164. #define DL_TOKEN_REQ_SIZE    sizeof(dl_token_req_t)
  1165. #define DL_TOKEN_ACK_SIZE    sizeof(dl_token_ack_t)
  1166. #define DL_DISCONNECT_REQ_SIZE    sizeof(dl_disconnect_req_t)
  1167. #define DL_DISCONNECT_IND_SIZE    sizeof(dl_disconnect_ind_t)
  1168. #define DL_RESET_REQ_SIZE    sizeof(dl_reset_req_t)
  1169. #define DL_RESET_IND_SIZE    sizeof(dl_reset_ind_t)
  1170. #define DL_RESET_RES_SIZE    sizeof(dl_reset_res_t)
  1171. #define DL_RESET_CON_SIZE    sizeof(dl_reset_con_t)
  1172. #define DL_UNITDATA_REQ_SIZE    sizeof(dl_unitdata_req_t)
  1173. #define DL_UNITDATA_IND_SIZE    sizeof(dl_unitdata_ind_t)
  1174. #define DL_UDERROR_IND_SIZE     sizeof(dl_uderror_ind_t)
  1175. #define DL_UDQOS_REQ_SIZE    sizeof(dl_udqos_req_t)
  1176. #define DL_ENABMULTI_REQ_SIZE    sizeof(dl_enabmulti_req_t)
  1177. #define DL_DISABMULTI_REQ_SIZE    sizeof(dl_disabmulti_req_t)
  1178. #define DL_PROMISCON_REQ_SIZE    sizeof(dl_promiscon_req_t)
  1179. #define DL_PROMISCOFF_REQ_SIZE    sizeof(dl_promiscoff_req_t)
  1180. #define DL_PHYS_ADDR_REQ_SIZE    sizeof(dl_phys_addr_req_t)
  1181. #define DL_PHYS_ADDR_ACK_SIZE    sizeof(dl_phys_addr_ack_t)
  1182. #define DL_SET_PHYS_ADDR_REQ_SIZE    sizeof(dl_set_phys_addr_req_t)
  1183. #define DL_GET_STATISTICS_REQ_SIZE    sizeof(dl_get_statistics_req_t)
  1184. #define DL_GET_STATISTICS_ACK_SIZE    sizeof(dl_get_statistics_ack_t)
  1185. #define DL_XID_REQ_SIZE     sizeof(dl_xid_req_t)
  1186. #define DL_XID_IND_SIZE     sizeof(dl_xid_ind_t)
  1187. #define DL_XID_RES_SIZE     sizeof(dl_xid_res_t)
  1188. #define DL_XID_CON_SIZE     sizeof(dl_xid_con_t)
  1189. #define DL_TEST_REQ_SIZE    sizeof(dl_test_req_t)
  1190. #define DL_TEST_IND_SIZE    sizeof(dl_test_ind_t)
  1191. #define DL_TEST_RES_SIZE    sizeof(dl_test_res_t)
  1192. #define DL_TEST_CON_SIZE    sizeof(dl_test_con_t)
  1193. #define DL_DATA_ACK_REQ_SIZE    sizeof(dl_data_ack_req_t)
  1194. #define DL_DATA_ACK_IND_SIZE    sizeof(dl_data_ack_ind_t)
  1195. #define DL_DATA_ACK_STATUS_IND_SIZE     sizeof(dl_data_ack_status_ind_t)
  1196. #define DL_REPLY_REQ_SIZE    sizeof(dl_reply_req_t)
  1197. #define DL_REPLY_IND_SIZE    sizeof(dl_reply_ind_t)
  1198. #define DL_REPLY_STATUS_IND_SIZE    sizeof(dl_reply_status_ind_t)
  1199. #define DL_REPLY_UPDATE_REQ_SIZE    sizeof(dl_reply_update_req_t)
  1200. #define DL_REPLY_UPDATE_STATUS_IND_SIZE sizeof(dl_reply_update_status_ind_t)
  1201.  
  1202. #define DLIOCRAW        MIOC_CMD(MIOC_DLPI,1)        /* M_DATA "raw" mode */
  1203. #define DL_IOC_HDR_INFO MIOC_CMD(MIOC_DLPI,10)        /* ??? */
  1204.  
  1205. #if PRAGMA_ALIGN_SUPPORTED
  1206. #pragma options align=reset
  1207. #endif
  1208.  
  1209. #endif /* _SYS_DLPI_H */
  1210.